Justin Uang - CS 184


This is where I will post optional and required assignment results


Homework 5 - Ray Tracer

For homework 5, we wrote a ray tracer from scratch in C++. Click on the links below to see the Milestone and Final Submission reports.


Milestone:

For this Project milestone, my partner and I implemented basic functionality in ray tracer. Specifically, we programmed camera specification and the basic intersection test for quads in our ray tracer. We also implemented a file parser to read in .test files and generate images based on the commands. Below are sample images of a red square viewed from different camera angles.





Final Submission:

We implemented a raytracer capable of generating the following images:

Here are a couple test images provided by the class. As can be seen below, we implemented shadows and specular reflections (using recursive ray tracing).

The following two images were rendered using our kd-tree implementation. See the README for a report on the speedup we experienced.

For extra credit, here is an image of a stool that we rendered from an OBJ file that we parsed in.
For extra credit, we implemented textures. As you can see, the american flag on the floor was a texture.

For extra credit, we also implemented anti-aliasing via jittering. The first image uses 2^2 rays per pixel, while the second image uses 3^2 images per pixel. However, the difference in the anti-aliasing is noticable when comparing the edge of the spheres in the two images.